<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Bandit-Blog前台</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/editor.md-master/css/editormd.css">
</head>
<body>

<!-- 导航栏 -->
<div class="layui-header">
    <div class="nav">
        <div class="layui-row">
            <div class="layui-col-lg1">
                <div class="nav-logo">
                    <div><a href="">Bandit</a></div>
                </div>
            </div>
            <div class="layui-col-lg11">

                <ul class="layui-nav" lay-filter="">
                    <!-- 移动端显示 -->
                    <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm">
                        <i class="layui-icon layui-icon-spread-left"></i></li>
                    <li class="layui-nav-item ${index}"><a href="/toIndex">首页</a></li>
                    <li class="layui-nav-item ${pigeonhole}"><a href="/toPigeonhole">归档</a></li>
                    <li class="layui-nav-item ${about}"><a href="/toAbout">更新日志</a></li>
                </ul>

                <ul class="layui-nav layui-layout-right">
                    <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                        <a href="javascript:;">
                            <img src="${pageContext.request.contextPath}/static/pic/2头像.jpg"
                                 class="layui-nav-img">
                            <c:choose>
                                <c:when test="${sessionScope.LoginUser == null}">
                                    未登录
                                </c:when>
                                <c:otherwise>${sessionScope.LoginUser}</c:otherwise>
                            </c:choose>
                        </a>
                        <dl class="layui-nav-child">
                            <c:choose>
                                <c:when test="${sessionScope.LoginUser == null}">
                                    <dd ><a href="${pageContext.request.contextPath}/toLogin">登录${sessionScope.LoginUser}</a></dd>
                                </c:when>
                                <c:otherwise></c:otherwise>
                            </c:choose>
                            <c:if test="${!empty sessionScope.LoginUser}">
                                <dd><a href="/toBackIndex">后台页面</a></dd>
                            </c:if>
<%--                            <dd><a href="">个人信息</a></dd>--%>
<%--                            <dd><a href="">设置</a></dd>--%>
                            <dd><a href="/logout">登出</a></dd>

                        </dl>
                    </li>
                    <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                        <a href="javascript:;">
                            <i class="layui-icon layui-icon-more-vertical"></i>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
</div>

</body>
</html>
